"""
@author: jpj
@email: pj.jiang@hzgosun.com
@file: ondutyQueryPage.py
@time: 2019/7/24 10:54

"""
from poium import PageElement
from common.poium import Page
from common.vue.search import VueSearch
from common.vue.table import VueTurnPage, VueTable


class SearchTools(VueSearch):
    time_input = PageElement(xpath='//*[@id="app"]/div/div[2]/div[2]/div/form/div[1]/div/div/div[1]/div/input',
                             describe="时间框")
    select_time = PageElement(
        xpath='//*[@id="app"]/div/div[2]/div[2]/div/form/div[1]/div/div/div[2]/div/div/div/div[1]/span[2]/i',
        describe="定位日期")
    time = PageElement(
        xpath="//*[@id='app']/div/div[2]/div[2]/div/form/div[1]/div/div/div[2]/div/div/div/div[2]/div/span[13]",
        describe="选择日期")
    download = PageElement(link_text="下载模板", describe="下载模板")
    upload = PageElement(class_name="ivu-upload-input", describe="上传值班表")


class Table(VueTable):
    """值班查询列表"""

    def __init__(self):
        super(Table, self).__init__()


class Ondutyquery(Page):
    turnPage = VueTurnPage()
    searchTools = SearchTools()
    table = Table()  # 列表
